   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"beep.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.beep_SetType,"ax",%progbits
  20              		.align	1
  21              		.thumb
  22              		.thumb_func
  24              	beep_SetType:
  25              	.LFB4:
  26              		.file 1 "uc_libc_dev/sound/beep/beep.c"
   1:uc_libc_dev/sound/beep/beep.c **** #include "beep.h"
   2:uc_libc_dev/sound/beep/beep.c **** 
   3:uc_libc_dev/sound/beep/beep.c **** 
   4:uc_libc_dev/sound/beep/beep.c **** // |------------------- nBYtes -------------------------| --- interval = 0 (sem repetições) -------
   5:uc_libc_dev/sound/beep/beep.c **** //      tOn1    tOff1   tOn2    tOff2   tOn3    tOff3
   6:uc_libc_dev/sound/beep/beep.c **** // _____########________########________########________
   7:uc_libc_dev/sound/beep/beep.c **** 
   8:uc_libc_dev/sound/beep/beep.c **** // |------------------- nBYtes -------------------------| -- interval > 0 (com repetições continua)
   9:uc_libc_dev/sound/beep/beep.c **** //      tOn1    tOff1   tOn2    tOff2   tOn3    tOff3
  10:uc_libc_dev/sound/beep/beep.c **** // _____########________########________########________ __________________________________________
  11:uc_libc_dev/sound/beep/beep.c **** 
  12:uc_libc_dev/sound/beep/beep.c **** #define nPULSE_BEEPS 3 // Quantidade de beeps emitidos por vez
  13:uc_libc_dev/sound/beep/beep.c **** 
  14:uc_libc_dev/sound/beep/beep.c **** typedef struct {
  15:uc_libc_dev/sound/beep/beep.c **** 	uint tOn; 	// tempo que o beep fique ligado
  16:uc_libc_dev/sound/beep/beep.c **** 	uint tOff; 	// tempo que o beep fique desligado
  17:uc_libc_dev/sound/beep/beep.c **** } tPulseBeep;
  18:uc_libc_dev/sound/beep/beep.c **** 
  19:uc_libc_dev/sound/beep/beep.c **** typedef struct {
  20:uc_libc_dev/sound/beep/beep.c **** 	unsigned power:1;	// Aciona ou não a emissão de beeps
  21:uc_libc_dev/sound/beep/beep.c **** 	uint type;			// Determina o tipo sonoro
  22:uc_libc_dev/sound/beep/beep.c **** 	uint nBeeps;		// Quantos beeps emitidos
  23:uc_libc_dev/sound/beep/beep.c **** 	uint index;			// Indece do beep atual para ser emitido
  24:uc_libc_dev/sound/beep/beep.c **** 	tPulseBeep pulse[nPULSE_BEEPS]; // registra os tempos de on/off dos beeps
  25:uc_libc_dev/sound/beep/beep.c **** 	uint intervalLoad;	// Carregar valor para interval
  26:uc_libc_dev/sound/beep/beep.c **** 	uint interval;		// Tempo entre repetições dos beeps. Valor 0 sem repetições
  27:uc_libc_dev/sound/beep/beep.c **** } tBeep, *pBeep;
  28:uc_libc_dev/sound/beep/beep.c **** static tBeep beep;
  29:uc_libc_dev/sound/beep/beep.c **** 
  30:uc_libc_dev/sound/beep/beep.c **** static void beep_SetType(void);
  31:uc_libc_dev/sound/beep/beep.c **** 
  32:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  33:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Inicializa o gerenciador de beeps
  34:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  35:uc_libc_dev/sound/beep/beep.c **** void beep_Init(void) {
  36:uc_libc_dev/sound/beep/beep.c **** 	beep_SetupPorts();
  37:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF; 	// Mantém desligado e emissão de beeps
  38:uc_libc_dev/sound/beep/beep.c **** }
  39:uc_libc_dev/sound/beep/beep.c **** 
  40:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  41:uc_libc_dev/sound/beep/beep.c **** // Descrição: Liga o beep para emitir um tipo sonoro
  42:uc_libc_dev/sound/beep/beep.c **** // Parametro Type: tipo beep será emitido
  43:uc_libc_dev/sound/beep/beep.c **** //			beepOFF 				Beep desligado
  44:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS 			Beep ligado direto
  45:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS_ONOFF 	Emissão de um beep curto em intervalos
  46:uc_libc_dev/sound/beep/beep.c **** //			beep1SHORTBEEP 			Emissão de um beep curto
  47:uc_libc_dev/sound/beep/beep.c **** //			beep3SHORTBEEP 			Emissão de três beeps curtos
  48:uc_libc_dev/sound/beep/beep.c **** //			beepCONTINUOUS_2xONOFF	Emissão de dois beeps curtos em intervalos
  49:uc_libc_dev/sound/beep/beep.c **** //			beep1LONG2SHORTBEEP		Emissão um beep longo e dois beeps curtos
  50:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  51:uc_libc_dev/sound/beep/beep.c **** void beep_Play(uint type) {
  52:uc_libc_dev/sound/beep/beep.c **** 	if (type) {
  53:uc_libc_dev/sound/beep/beep.c **** 		beep.type = type;
  54:uc_libc_dev/sound/beep/beep.c **** 		beep_SetType();
  55:uc_libc_dev/sound/beep/beep.c **** 		beep.power = pdON;
  56:uc_libc_dev/sound/beep/beep.c **** 	} else beep.power = pdOFF;
  57:uc_libc_dev/sound/beep/beep.c **** }
  58:uc_libc_dev/sound/beep/beep.c **** 
  59:uc_libc_dev/sound/beep/beep.c **** // retorna o que está sendo tocado no buzzer
  60:uc_libc_dev/sound/beep/beep.c **** // util caso queira esperar pela emissão completa do tipo de beep e emitir outro tipo
  61:uc_libc_dev/sound/beep/beep.c **** uint beep_Playing (void) {
  62:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdON) return beep.type;
  63:uc_libc_dev/sound/beep/beep.c **** 	else return 0;
  64:uc_libc_dev/sound/beep/beep.c **** }
  65:uc_libc_dev/sound/beep/beep.c **** 
  66:uc_libc_dev/sound/beep/beep.c **** // Para qualquer emissão de som
  67:uc_libc_dev/sound/beep/beep.c **** void beep_Stop(void) {
  68:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF;
  69:uc_libc_dev/sound/beep/beep.c **** }
  70:uc_libc_dev/sound/beep/beep.c **** 
  71:uc_libc_dev/sound/beep/beep.c **** 
  72:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  73:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Ajusta o controlador a emitir o tipo sonoro
  74:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
  75:uc_libc_dev/sound/beep/beep.c **** static void beep_SetType(void) {
  27              		.loc 1 75 0
  28              		.cfi_startproc
  29              		@ args = 0, pretend = 0, frame = 0
  30              		@ frame_needed = 0, uses_anonymous_args = 0
  31              		@ link register save eliminated.
  32              	.LVL0:
  76:uc_libc_dev/sound/beep/beep.c **** 	uint x; for(x=0;x<nPULSE_BEEPS;x++) { beep.pulse[x].tOff = 0; beep.pulse[x].tOn = 0;}
  33              		.loc 1 76 0
  34 0000 204B     		ldr	r3, .L12
  35 0002 0022     		movs	r2, #0
  36 0004 5A61     		str	r2, [r3, #20]
  37 0006 1A61     		str	r2, [r3, #16]
  38              	.LVL1:
  39 0008 DA61     		str	r2, [r3, #28]
  40 000a 9A61     		str	r2, [r3, #24]
  41              	.LVL2:
  42 000c 5A62     		str	r2, [r3, #36]
  43 000e 1A62     		str	r2, [r3, #32]
  44              	.LVL3:
  77:uc_libc_dev/sound/beep/beep.c **** 	beep.index = 0;
  45              		.loc 1 77 0
  46 0010 DA60     		str	r2, [r3, #12]
  78:uc_libc_dev/sound/beep/beep.c **** 	beep.interval = 0;
  47              		.loc 1 78 0
  48 0012 DA62     		str	r2, [r3, #44]
  79:uc_libc_dev/sound/beep/beep.c **** 
  80:uc_libc_dev/sound/beep/beep.c **** 	switch(beep.type) {
  49              		.loc 1 80 0
  50 0014 5A68     		ldr	r2, [r3, #4]
  51 0016 023A     		subs	r2, r2, #2
  52 0018 042A     		cmp	r2, #4
  53 001a 32D8     		bhi	.L1
  54 001c DFE802F0 		tbb	[pc, r2]
  55              	.L4:
  56 0020 13       		.byte	(.L3-.L4)/2
  57 0021 03       		.byte	(.L5-.L4)/2
  58 0022 09       		.byte	(.L6-.L4)/2
  59 0023 1B       		.byte	(.L7-.L4)/2
  60 0024 25       		.byte	(.L8-.L4)/2
  61 0025 00       		.p2align 1
  62              	.L5:
  81:uc_libc_dev/sound/beep/beep.c **** 	case beep1SHORTBEEP:
  82:uc_libc_dev/sound/beep/beep.c ****  		beep.nBeeps = 1; // Emitir 1 beep
  63              		.loc 1 82 0
  64 0026 0122     		movs	r2, #1
  65 0028 9A60     		str	r2, [r3, #8]
  83:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 50; // Primeiro beep 50 ms ligado
  66              		.loc 1 83 0
  67 002a 3222     		movs	r2, #50
  68 002c 1A61     		str	r2, [r3, #16]
  84:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 50; // Primeiro beep 50 ms desligado
  69              		.loc 1 84 0
  70 002e 5A61     		str	r2, [r3, #20]
  71 0030 25E0     		b	.L10
  72              	.L6:
  85:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 0; // sem repetições
  86:uc_libc_dev/sound/beep/beep.c **** 		break;
  87:uc_libc_dev/sound/beep/beep.c **** 	case beep3SHORTBEEP:
  88:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 3; // Emitir 3 beeps
  73              		.loc 1 88 0
  74 0032 0322     		movs	r2, #3
  75 0034 9A60     		str	r2, [r3, #8]
  76              	.LVL4:
  89:uc_libc_dev/sound/beep/beep.c **** 		for(x=0;x<3;x++) { beep.pulse[x].tOff = 50; beep.pulse[x].tOn = 50;} // todos os beeps 50ms ligad
  77              		.loc 1 89 0
  78 0036 3222     		movs	r2, #50
  79 0038 5A61     		str	r2, [r3, #20]
  80 003a 1A61     		str	r2, [r3, #16]
  81              	.LVL5:
  82 003c DA61     		str	r2, [r3, #28]
  83 003e 9A61     		str	r2, [r3, #24]
  84              	.LVL6:
  85 0040 5A62     		str	r2, [r3, #36]
  86 0042 1A62     		str	r2, [r3, #32]
  87              	.LVL7:
  88 0044 1BE0     		b	.L10
  89              	.L3:
  90:uc_libc_dev/sound/beep/beep.c **** 		beep.intervalLoad = 0; // sem repetições
  91:uc_libc_dev/sound/beep/beep.c **** 		break;
  92:uc_libc_dev/sound/beep/beep.c **** 	case beepCONTINUOUS_ONOFF:
  93:uc_libc_dev/sound/beep/beep.c ****  		beep.nBeeps = 1; // Emitir 1 beep
  90              		.loc 1 93 0
  91 0046 0122     		movs	r2, #1
  92 0048 9A60     		str	r2, [r3, #8]
  94:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
  95:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 800; // Primeiro beep 800 ms desligado
  93              		.loc 1 95 0
  94 004a 4FF44871 		mov	r1, #800
  94:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
  95              		.loc 1 94 0
  96 004e 6422     		movs	r2, #100
  97 0050 1A61     		str	r2, [r3, #16]
  98              		.loc 1 95 0
  99 0052 5961     		str	r1, [r3, #20]
 100 0054 14E0     		b	.L9
 101              	.L7:
  96:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 100; // repetir os beeps a cada 100ms
  97:uc_libc_dev/sound/beep/beep.c **** 		break;
  98:uc_libc_dev/sound/beep/beep.c **** 	case beepCONTINUOUS_2xONOFF:
  99:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 2; // Emitir 2 beeps
 102              		.loc 1 99 0
 103 0056 0222     		movs	r2, #2
 104 0058 9A60     		str	r2, [r3, #8]
 100:uc_libc_dev/sound/beep/beep.c **** 		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
 105              		.loc 1 100 0
 106 005a 6422     		movs	r2, #100
 107 005c 1A61     		str	r2, [r3, #16]
 101:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 100; // Primeiro beep 100 ms desligado
 108              		.loc 1 101 0
 109 005e 5A61     		str	r2, [r3, #20]
 102:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOn = 100; // Segundo beep 100 ms ligado
 110              		.loc 1 102 0
 111 0060 9A61     		str	r2, [r3, #24]
 103:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOff = 100; // Segundo beep 100 ms desligado
 112              		.loc 1 103 0
 113 0062 DA61     		str	r2, [r3, #28]
 104:uc_libc_dev/sound/beep/beep.c ****  		beep.intervalLoad = 2000; // repetir os beeps a cada 2000ms
 114              		.loc 1 104 0
 115 0064 4FF4FA62 		mov	r2, #2000
 116 0068 0AE0     		b	.L9
 117              	.L8:
 105:uc_libc_dev/sound/beep/beep.c **** 		break;
 106:uc_libc_dev/sound/beep/beep.c **** 	case beep1LONG2SHORTBEEP:
 107:uc_libc_dev/sound/beep/beep.c **** 		beep.nBeeps = 3; // Emitir 3 beeps
 118              		.loc 1 107 0
 119 006a 0322     		movs	r2, #3
 120 006c 9A60     		str	r2, [r3, #8]
 108:uc_libc_dev/sound/beep/beep.c **** 
 109:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOn = 100; // Primeiro beep 100 ms ligado
 121              		.loc 1 109 0
 122 006e 6422     		movs	r2, #100
 123 0070 1A61     		str	r2, [r3, #16]
 110:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[0].tOff = 100; // Primeiro beep 100 ms desligado
 124              		.loc 1 110 0
 125 0072 5A61     		str	r2, [r3, #20]
 111:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOn = 50; // Segundo beep 50 ms ligado
 126              		.loc 1 111 0
 127 0074 3222     		movs	r2, #50
 128 0076 9A61     		str	r2, [r3, #24]
 112:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[1].tOff = 50; // Segundo beep 50 ms desligado
 129              		.loc 1 112 0
 130 0078 DA61     		str	r2, [r3, #28]
 113:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOn = 50; // Terceiro beep 50 ms ligado
 131              		.loc 1 113 0
 132 007a 1A62     		str	r2, [r3, #32]
 114:uc_libc_dev/sound/beep/beep.c ****  		beep.pulse[2].tOff = 50; // Terceiro beep 50 ms desligado
 133              		.loc 1 114 0
 134 007c 5A62     		str	r2, [r3, #36]
 135              	.L10:
 115:uc_libc_dev/sound/beep/beep.c **** 		beep.intervalLoad = 0; // sem repetições
 136              		.loc 1 115 0
 137 007e 0022     		movs	r2, #0
 138              	.L9:
 139 0080 9A62     		str	r2, [r3, #40]
 140              	.L1:
 141 0082 7047     		bx	lr
 142              	.L13:
 143              		.align	2
 144              	.L12:
 145 0084 00000000 		.word	.LANCHOR0
 146              		.cfi_endproc
 147              	.LFE4:
 149              		.section	.text.beep_Init,"ax",%progbits
 150              		.align	1
 151              		.global	beep_Init
 152              		.thumb
 153              		.thumb_func
 155              	beep_Init:
 156              	.LFB0:
  35:uc_libc_dev/sound/beep/beep.c **** 	beep_SetupPorts();
 157              		.loc 1 35 0
 158              		.cfi_startproc
 159              		@ args = 0, pretend = 0, frame = 0
 160              		@ frame_needed = 0, uses_anonymous_args = 0
 161              		@ link register save eliminated.
  36:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF; 	// Mantém desligado e emissão de beeps
 162              		.loc 1 36 0
 163 0000 074A     		ldr	r2, .L15
 164 0002 1368     		ldr	r3, [r2]
 165 0004 43F48003 		orr	r3, r3, #4194304
 166 0008 1360     		str	r3, [r2]
 167 000a 064B     		ldr	r3, .L15+4
 168 000c 4FF48002 		mov	r2, #4194304
 169 0010 1A60     		str	r2, [r3]
  37:uc_libc_dev/sound/beep/beep.c **** }
 170              		.loc 1 37 0
 171 0012 054B     		ldr	r3, .L15+8
 172 0014 1A78     		ldrb	r2, [r3]	@ zero_extendqisi2
 173 0016 6FF30002 		bfc	r2, #0, #1
 174 001a 1A70     		strb	r2, [r3]
 175 001c 7047     		bx	lr
 176              	.L16:
 177 001e 00BF     		.align	2
 178              	.L15:
 179 0020 00C00920 		.word	537509888
 180 0024 1CC00920 		.word	537509916
 181 0028 00000000 		.word	.LANCHOR0
 182              		.cfi_endproc
 183              	.LFE0:
 185              		.section	.text.beep_Play,"ax",%progbits
 186              		.align	1
 187              		.global	beep_Play
 188              		.thumb
 189              		.thumb_func
 191              	beep_Play:
 192              	.LFB1:
  51:uc_libc_dev/sound/beep/beep.c **** 	if (type) {
 193              		.loc 1 51 0
 194              		.cfi_startproc
 195              		@ args = 0, pretend = 0, frame = 0
 196              		@ frame_needed = 0, uses_anonymous_args = 0
 197              	.LVL8:
 198 0000 10B5     		push	{r4, lr}
 199              	.LCFI0:
 200              		.cfi_def_cfa_offset 8
 201              		.cfi_offset 4, -8
 202              		.cfi_offset 14, -4
 203 0002 074C     		ldr	r4, .L21
  52:uc_libc_dev/sound/beep/beep.c **** 		beep.type = type;
 204              		.loc 1 52 0
 205 0004 30B1     		cbz	r0, .L18
  53:uc_libc_dev/sound/beep/beep.c **** 		beep_SetType();
 206              		.loc 1 53 0
 207 0006 6060     		str	r0, [r4, #4]
  54:uc_libc_dev/sound/beep/beep.c **** 		beep.power = pdON;
 208              		.loc 1 54 0
 209 0008 FFF7FEFF 		bl	beep_SetType
 210              	.LVL9:
  55:uc_libc_dev/sound/beep/beep.c **** 	} else beep.power = pdOFF;
 211              		.loc 1 55 0
 212 000c 2378     		ldrb	r3, [r4]	@ zero_extendqisi2
 213 000e 43F00103 		orr	r3, r3, #1
 214 0012 02E0     		b	.L20
 215              	.LVL10:
 216              	.L18:
  56:uc_libc_dev/sound/beep/beep.c **** }
 217              		.loc 1 56 0
 218 0014 2378     		ldrb	r3, [r4]	@ zero_extendqisi2
 219 0016 60F30003 		bfi	r3, r0, #0, #1
 220              	.LVL11:
 221              	.L20:
 222 001a 2370     		strb	r3, [r4]
 223 001c 10BD     		pop	{r4, pc}
 224              	.L22:
 225 001e 00BF     		.align	2
 226              	.L21:
 227 0020 00000000 		.word	.LANCHOR0
 228              		.cfi_endproc
 229              	.LFE1:
 231              		.section	.text.beep_Playing,"ax",%progbits
 232              		.align	1
 233              		.global	beep_Playing
 234              		.thumb
 235              		.thumb_func
 237              	beep_Playing:
 238              	.LFB2:
  61:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdON) return beep.type;
 239              		.loc 1 61 0
 240              		.cfi_startproc
 241              		@ args = 0, pretend = 0, frame = 0
 242              		@ frame_needed = 0, uses_anonymous_args = 0
 243              		@ link register save eliminated.
  62:uc_libc_dev/sound/beep/beep.c **** 	else return 0;
 244              		.loc 1 62 0
 245 0000 034B     		ldr	r3, .L26
 246 0002 1878     		ldrb	r0, [r3]	@ zero_extendqisi2
 247 0004 10F00100 		ands	r0, r0, #1
 248 0008 18BF     		it	ne
 249 000a 5868     		ldrne	r0, [r3, #4]
  64:uc_libc_dev/sound/beep/beep.c **** 
 250              		.loc 1 64 0
 251 000c 7047     		bx	lr
 252              	.L27:
 253 000e 00BF     		.align	2
 254              	.L26:
 255 0010 00000000 		.word	.LANCHOR0
 256              		.cfi_endproc
 257              	.LFE2:
 259              		.section	.text.beep_Stop,"ax",%progbits
 260              		.align	1
 261              		.global	beep_Stop
 262              		.thumb
 263              		.thumb_func
 265              	beep_Stop:
 266              	.LFB3:
  67:uc_libc_dev/sound/beep/beep.c **** 	beep.power = pdOFF;
 267              		.loc 1 67 0
 268              		.cfi_startproc
 269              		@ args = 0, pretend = 0, frame = 0
 270              		@ frame_needed = 0, uses_anonymous_args = 0
 271              		@ link register save eliminated.
  68:uc_libc_dev/sound/beep/beep.c **** }
 272              		.loc 1 68 0
 273 0000 024B     		ldr	r3, .L29
 274 0002 1A78     		ldrb	r2, [r3]	@ zero_extendqisi2
 275 0004 6FF30002 		bfc	r2, #0, #1
 276 0008 1A70     		strb	r2, [r3]
 277 000a 7047     		bx	lr
 278              	.L30:
 279              		.align	2
 280              	.L29:
 281 000c 00000000 		.word	.LANCHOR0
 282              		.cfi_endproc
 283              	.LFE3:
 285              		.section	.text.beep_Tick,"ax",%progbits
 286              		.align	1
 287              		.global	beep_Tick
 288              		.thumb
 289              		.thumb_func
 291              	beep_Tick:
 292              	.LFB5:
 116:uc_libc_dev/sound/beep/beep.c **** 		break;
 117:uc_libc_dev/sound/beep/beep.c **** 
 118:uc_libc_dev/sound/beep/beep.c **** 	default: //beepCONTINUOUS
 119:uc_libc_dev/sound/beep/beep.c **** 		break;
 120:uc_libc_dev/sound/beep/beep.c **** 	}
 121:uc_libc_dev/sound/beep/beep.c **** }
 122:uc_libc_dev/sound/beep/beep.c **** 
 123:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
 124:uc_libc_dev/sound/beep/beep.c **** // Descrição:	Evento a ser chamado a cada 1ms para control de emissão sonora
 125:uc_libc_dev/sound/beep/beep.c **** // ------------------------------------------------------------------------------------------------
 126:uc_libc_dev/sound/beep/beep.c **** //static uint interval = 0;
 127:uc_libc_dev/sound/beep/beep.c **** 
 128:uc_libc_dev/sound/beep/beep.c **** void beep_Tick(void) {
 293              		.loc 1 128 0
 294              		.cfi_startproc
 295              		@ args = 0, pretend = 0, frame = 0
 296              		@ frame_needed = 0, uses_anonymous_args = 0
 129:uc_libc_dev/sound/beep/beep.c **** 	// Se não é para emitir som, vamos desligar o buzzer e sair fora
 130:uc_libc_dev/sound/beep/beep.c **** 	if (beep.power == pdOFF) {
 297              		.loc 1 130 0
 298 0000 1F48     		ldr	r0, .L42
 128:uc_libc_dev/sound/beep/beep.c **** 	// Se não é para emitir som, vamos desligar o buzzer e sair fora
 299              		.loc 1 128 0
 300 0002 10B5     		push	{r4, lr}
 301              	.LCFI1:
 302              		.cfi_def_cfa_offset 8
 303              		.cfi_offset 4, -8
 304              		.cfi_offset 14, -4
 305              		.loc 1 130 0
 306 0004 0278     		ldrb	r2, [r0]	@ zero_extendqisi2
 307 0006 D307     		lsls	r3, r2, #31
 308 0008 03D4     		bmi	.L32
 131:uc_libc_dev/sound/beep/beep.c **** 		beep_BuzzerOFF();
 309              		.loc 1 131 0
 310 000a 4FF48002 		mov	r2, #4194304
 311 000e 1D4B     		ldr	r3, .L42+4
 312 0010 05E0     		b	.L40
 313              	.L32:
 132:uc_libc_dev/sound/beep/beep.c **** 		return;
 133:uc_libc_dev/sound/beep/beep.c **** 	}
 134:uc_libc_dev/sound/beep/beep.c **** 
 135:uc_libc_dev/sound/beep/beep.c **** 	// se é o beep acionado direto liga o buzzer e cai fora
 136:uc_libc_dev/sound/beep/beep.c **** 	if (beep.type == beepCONTINUOUS) {
 314              		.loc 1 136 0
 315 0012 4368     		ldr	r3, [r0, #4]
 316 0014 012B     		cmp	r3, #1
 317 0016 04D1     		bne	.L34
 137:uc_libc_dev/sound/beep/beep.c **** 		beep_BuzzerON();
 318              		.loc 1 137 0
 319 0018 1B4B     		ldr	r3, .L42+8
 320 001a 4FF48002 		mov	r2, #4194304
 321              	.L40:
 322 001e 1A60     		str	r2, [r3]
 138:uc_libc_dev/sound/beep/beep.c **** 		return;
 323              		.loc 1 138 0
 324 0020 10BD     		pop	{r4, pc}
 325              	.L34:
 139:uc_libc_dev/sound/beep/beep.c **** 	}
 140:uc_libc_dev/sound/beep/beep.c **** 
 141:uc_libc_dev/sound/beep/beep.c **** 	// respeitar o tempo entre emissão de beeps quando for de forma continua
 142:uc_libc_dev/sound/beep/beep.c **** 	if (beep.interval) beep.interval--;
 326              		.loc 1 142 0
 327 0022 C36A     		ldr	r3, [r0, #44]
 328 0024 0BB1     		cbz	r3, .L35
 329              		.loc 1 142 0 is_stmt 0 discriminator 1
 330 0026 013B     		subs	r3, r3, #1
 331 0028 22E0     		b	.L41
 332              	.L35:
 143:uc_libc_dev/sound/beep/beep.c **** 	else {
 144:uc_libc_dev/sound/beep/beep.c **** 		if (beep.pulse[beep.index].tOn) { // Checa se ainda é tempo de ficar ativo o buzzer
 333              		.loc 1 144 0 is_stmt 1
 334 002a C168     		ldr	r1, [r0, #12]
 335 002c 8B1C     		adds	r3, r1, #2
 336 002e 50F83340 		ldr	r4, [r0, r3, lsl #3]
 337 0032 3CB1     		cbz	r4, .L36
 145:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerON(); // Liga o buzzer
 338              		.loc 1 145 0
 339 0034 144A     		ldr	r2, .L42+8
 340 0036 4FF48001 		mov	r1, #4194304
 146:uc_libc_dev/sound/beep/beep.c **** 			beep.pulse[beep.index].tOn--; // decrementa o tempo de permanecer ligado
 341              		.loc 1 146 0
 342 003a 013C     		subs	r4, r4, #1
 145:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerON(); // Liga o buzzer
 343              		.loc 1 145 0
 344 003c 1160     		str	r1, [r2]
 345              		.loc 1 146 0
 346 003e 40F83340 		str	r4, [r0, r3, lsl #3]
 347 0042 10BD     		pop	{r4, pc}
 348              	.L36:
 147:uc_libc_dev/sound/beep/beep.c **** 		} else if (beep.pulse[beep.index].tOff) { // Checa se é ainda tempo de ficar desativo o buzzer
 349              		.loc 1 147 0
 350 0044 00EBC303 		add	r3, r0, r3, lsl #3
 351 0048 5C68     		ldr	r4, [r3, #4]
 352 004a 34B1     		cbz	r4, .L37
 148:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerOFF(); // desliga o buzzer
 353              		.loc 1 148 0
 354 004c 0D4A     		ldr	r2, .L42+4
 355 004e 4FF48001 		mov	r1, #4194304
 149:uc_libc_dev/sound/beep/beep.c **** 			beep.pulse[beep.index].tOff--; // decrementa o tempo de permanecer desligado
 356              		.loc 1 149 0
 357 0052 013C     		subs	r4, r4, #1
 148:uc_libc_dev/sound/beep/beep.c **** 			beep_BuzzerOFF(); // desliga o buzzer
 358              		.loc 1 148 0
 359 0054 1160     		str	r1, [r2]
 360              		.loc 1 149 0
 361 0056 5C60     		str	r4, [r3, #4]
 362 0058 10BD     		pop	{r4, pc}
 363              	.L37:
 150:uc_libc_dev/sound/beep/beep.c **** 		// Vamos veriricar se fez todos os beeps e se é para tocar de forma continua o não,
 151:uc_libc_dev/sound/beep/beep.c **** 		//	se sim vamos recomeçar, senão para tudo
 152:uc_libc_dev/sound/beep/beep.c **** 		} else {
 153:uc_libc_dev/sound/beep/beep.c **** 			if (beep.index < beep.nBeeps) // Checa se fez todos os beeps
 364              		.loc 1 153 0
 365 005a 8368     		ldr	r3, [r0, #8]
 366 005c 9942     		cmp	r1, r3
 367 005e 02D2     		bcs	.L38
 154:uc_libc_dev/sound/beep/beep.c **** 				beep.index++; // vai para o próximo beep
 368              		.loc 1 154 0
 369 0060 0131     		adds	r1, r1, #1
 370 0062 C160     		str	r1, [r0, #12]
 371 0064 10BD     		pop	{r4, pc}
 372              	.L38:
 155:uc_libc_dev/sound/beep/beep.c **** 			else {
 156:uc_libc_dev/sound/beep/beep.c **** 				// se fez todos os beeps vamos checar se tem intervalo entre eles, se tiver vamos reiniciar
 157:uc_libc_dev/sound/beep/beep.c **** 				// senão pata tudo
 158:uc_libc_dev/sound/beep/beep.c **** 				if (beep.intervalLoad) {
 373              		.loc 1 158 0
 374 0066 816A     		ldr	r1, [r0, #40]
 375 0068 21B1     		cbz	r1, .L39
 159:uc_libc_dev/sound/beep/beep.c **** 					beep_SetType(); // reinicia as variáveis
 376              		.loc 1 159 0
 377 006a FFF7FEFF 		bl	beep_SetType
 378              	.LVL12:
 160:uc_libc_dev/sound/beep/beep.c **** 					beep.interval = beep.intervalLoad; // Captura o intervalo
 379              		.loc 1 160 0
 380 006e 836A     		ldr	r3, [r0, #40]
 381              	.L41:
 382 0070 C362     		str	r3, [r0, #44]
 383 0072 10BD     		pop	{r4, pc}
 384              	.L39:
 161:uc_libc_dev/sound/beep/beep.c **** 				} else beep.power = pdOFF; // desliga tudo
 385              		.loc 1 161 0
 386 0074 1346     		mov	r3, r2
 387 0076 61F30003 		bfi	r3, r1, #0, #1
 388 007a 0370     		strb	r3, [r0]
 389 007c 10BD     		pop	{r4, pc}
 390              	.L43:
 391 007e 00BF     		.align	2
 392              	.L42:
 393 0080 00000000 		.word	.LANCHOR0
 394 0084 1CC00920 		.word	537509916
 395 0088 18C00920 		.word	537509912
 396              		.cfi_endproc
 397              	.LFE5:
 399              		.section	.bss.beep,"aw",%nobits
 400              		.align	2
 401              		.set	.LANCHOR0,. + 0
 404              	beep:
 405 0000 00000000 		.space	48
 405      00000000 
 405      00000000 
 405      00000000 
 405      00000000 
 406              		.text
 407              	.Letext0:
 408              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
DEFINED SYMBOLS
                            *ABS*:00000000 beep.c
D:\_temp\_windows\ccVEqgL8.s:20     .text.beep_SetType:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:24     .text.beep_SetType:00000000 beep_SetType
D:\_temp\_windows\ccVEqgL8.s:56     .text.beep_SetType:00000020 $d
D:\_temp\_windows\ccVEqgL8.s:145    .text.beep_SetType:00000084 $d
D:\_temp\_windows\ccVEqgL8.s:150    .text.beep_Init:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:155    .text.beep_Init:00000000 beep_Init
D:\_temp\_windows\ccVEqgL8.s:179    .text.beep_Init:00000020 $d
D:\_temp\_windows\ccVEqgL8.s:186    .text.beep_Play:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:191    .text.beep_Play:00000000 beep_Play
D:\_temp\_windows\ccVEqgL8.s:227    .text.beep_Play:00000020 $d
D:\_temp\_windows\ccVEqgL8.s:232    .text.beep_Playing:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:237    .text.beep_Playing:00000000 beep_Playing
D:\_temp\_windows\ccVEqgL8.s:255    .text.beep_Playing:00000010 $d
D:\_temp\_windows\ccVEqgL8.s:260    .text.beep_Stop:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:265    .text.beep_Stop:00000000 beep_Stop
D:\_temp\_windows\ccVEqgL8.s:281    .text.beep_Stop:0000000c $d
D:\_temp\_windows\ccVEqgL8.s:286    .text.beep_Tick:00000000 $t
D:\_temp\_windows\ccVEqgL8.s:291    .text.beep_Tick:00000000 beep_Tick
D:\_temp\_windows\ccVEqgL8.s:393    .text.beep_Tick:00000080 $d
D:\_temp\_windows\ccVEqgL8.s:400    .bss.beep:00000000 $d
D:\_temp\_windows\ccVEqgL8.s:404    .bss.beep:00000000 beep
                     .debug_frame:00000010 $d
D:\_temp\_windows\ccVEqgL8.s:61     .text.beep_SetType:00000025 $d
D:\_temp\_windows\ccVEqgL8.s:61     .text.beep_SetType:00000026 $t

NO UNDEFINED SYMBOLS
